import time

from ykao.uizdh.Page.Page import Page
from selenium import webdriver
import pytest,logging
@pytest.fixture()
def dr():
    logging.error('用例执行前执行')
    dr=webdriver.Edge()
    dr.maximize_window()
    yield dr
    dr.close()
def test_001(dr):
    try:
        a=Page(dr)
        logging.error('用例执行时')
        a.yx()
    except Exception as e:
        t=time.strftime('%Y%m%d%H%M%S')
        logging.error('用例执行错误')
        print(e)
        dr.save_screenshot(t+'.png')
